import { RouteRecordRaw, RouterView } from 'vue-router'

const routes: RouteRecordRaw =
{
  path: 'product',
  component: RouterView,
  meta: { // 自定义元数据 meta
    title: '商品'
  },
  children: [
    {
      name: 'product-list',
      path: 'product_list',
      component: () => import('@/views/product/list/index.vue'),
      meta: { // 自定义元数据 meta
        title: '商品列表'
      }
    },
    {
      name: 'product-add',
      path: 'add_product',
      component: () => import('@/views/product/add/index.vue'),
      meta: { // 自定义元数据 meta
        title: '添加商品'
      }
    },
    {
      name: 'product-clssify',
      path: 'product_clssify',
      component: () => import('@/views/product/clssify/index.vue'),
      meta: {
        title: '商品分类'
      }
    },
    {
      name: 'product-attr',
      path: 'product_attr',
      component: () => import('@/views/product/attr/index.vue'),
      meta: {
        title: '商品规格'
      }
    },
    {
      name: 'product-reply',
      path: 'product_reply',
      component: () => import('@/views/product/reply/index.vue'),
      meta: {
        title: '商品评论'
      }
    },
    {
      name: 'product-add',
      path: 'product_add',
      component: () => import('@/views/product/reply/index.vue'),
      meta: {
        title: '商品新增'
      }
    },
    {
      name: 'product-upload',
      path: 'product_upload',
      component: () => import('@/views/product/upload/index.vue'),
      meta: {
        title: '大文件上传'
      }
    },
    {
      name: 'product-jsplumb',
      path: 'product_jsplumb',
      component: () => import('@/views/product/jsplumb/index.vue'),
      meta: {
        title: 'jsplumb拖拽连线'
      }
    },
    {
      name: 'product-localStorage',
      path: 'product_localStorage',
      component: () => import('@/views/product/localStorage/index.vue'),
      meta: {
        title: '监听localStorage'
      }
    }
  ]
}

export default routes
